package com.hkzhao.shixun.service;
import cn.hutool.core.lang.Pair;
import com.hkzhao.shixun.common.api.CommonResult;
import com.hkzhao.shixun.mbg.model.Activity;
import com.hkzhao.shixun.mbg.model.Lotteryrecord;
import com.hkzhao.shixun.mbg.model.Prize;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpServletRequest;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
public interface AdminService
{
    @Transactional
    CommonResult register(String username, String password);
    String login(String username,String password);
    String getAdminbytoken(HttpServletRequest httpServletRequest);
    Pair<String,String> newActivity(String id, String tag, String title, Date start, Date end, Double ci, String description, String uname, Integer participate, String drawstype, Integer drawsnum, String status);
    String addPrize(String prizeid,String activityid,String level,Double odd,String description,Integer nums,String url);
    String pic2qiniu(InputStream file, String key);
    String genqrbase64(String url);
    List<Lotteryrecord> getRecordby(String username,String actid,String recid,int pageNum,int pageSize);
    List<Activity> getActivityby(String actid,String tag,String title,String status,int pageNum,int pageSize);
    List<Prize> getPrizeby(String actid);
    String actActivity(String actid);
    String endActivity(String actid);
    Boolean delActivity(String actid);
    String modifyActivity(String actid,String title,Double costintegral,Integer drawsnum);
}
